﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LuckCycleSetting.ascx.cs" Inherits="Administrator_AdminControl_LuckCycleSetting" %>

<script type="text/javascript">
    $(document).ready(function () {
        $("#<%= txtPoint.ClientID %>").keydown(function (event) {
            KeyDown_IsInteger($("#<%= txtPoint.ClientID %>").val(), event);
        });

        $("#<%= txtTime.ClientID %>").keydown(function (event) {
            KeyDown_IsFloat($("#<%= txtTime.ClientID %>").val(), event);
        });
    });
</script>
        
<%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate> --%>

<asp:Literal ID="ltlScript" runat="server"></asp:Literal>            
<asp:Literal ID="ltlAlert" runat="server"></asp:Literal>

<div class="dasboard" style="width:80%;float:left">    

    <div class="staticTitle">Thời gian tăng điểm cho vòng quay may mắn</div>    
    <div class="style-padding1">
        <table style="width:94%">
            <tr>
                <td>Điểm</td>
                <td class="style1"><asp:TextBox ID="txtPoint" runat="server"/></td>
            </tr>
            <tr>
                <td>Thời gian</td>
                <td class="style1"><asp:TextBox ID="txtTime" runat="server" Width="89%" /></td>
                <td style="padding:20px">
                    <asp:Button ID="btnSave" runat="server" Text="Lưu" onclick="btnSave_Click"/>
                </td>
            </tr>
        </table>
               
        <asp:Repeater ID="rptRiseLucky" runat="server" 
            onitemcommand="rptRiseLucky_ItemCommand">
            <HeaderTemplate>
                <table class="headertable" cellpadding="0">
                    <tr>
                        <th style="width:10%;">STT</th>
                        <th style="width:35%">Điểm</th>
                        <th style="width:33%">Thời gian (h)</th>
                        <th style="width:12%"></th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                    <tr>
                        <td style="text-align:center;"><%#Container.ItemIndex+1 %></td>
                        <td>
                            <asp:Label ID="lblPoint" Text='<%# DataBinder.Eval(Container.DataItem, "LuckCycleSetting_Point")%>' runat="server" Visible="true"></asp:Label>
                            <asp:TextBox ID="txtPoint" Text='<%# DataBinder.Eval(Container.DataItem, "LuckCycleSetting_Point")%>' runat="server" Visible="false"></asp:TextBox>
                        </td>
                        <td>
                            <asp:Label ID="lblTime" Text='<%# DataBinder.Eval(Container.DataItem, "LuckCycleSetting_Time")%>' runat="server" Visible="true"></asp:Label>
                            <asp:TextBox ID="txtTime" Text='<%# DataBinder.Eval(Container.DataItem, "LuckCycleSetting_Time")%>' runat="server" Visible="false"></asp:TextBox>
                        </td>                        
                        <td>
                            <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="~/images/Admin/icon_edit.gif" CommandName="Edit"
                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem,"LuckCycleSetting_Id") %>' ToolTip="Cập nhật"/>
                            <asp:ImageButton ID="bntRefresh" runat="server" ImageUrl="~/images/Admin/InactiveRefresh.png" CommandName="Refresh"
                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem,"LuckCycleSetting_Id") %>' Enable="false" ToolTip="Hủy cập nhật"/>
                            <asp:ImageButton ID="btnDeletePoint" runat="server" ImageUrl="~/images/Admin/icon_delete.gif.png" CommandName="Delete"
                                     CommandArgument='<%# DataBinder.Eval(Container.DataItem,"LuckCycleSetting_Id") %>' OnClientClick="return confirm('Bạn có chắc muốn xóa không?')" ToolTip="Xóa"/>
                        </td>
                    </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </div>
</div>
<%--</ContentTemplate>        
</asp:UpdatePanel>--%>
